/*
 * Copyright © 2022 XXXXXXXXX
 * @Author: zhangxiang
 * @Date: 2022-06-09 15:20:43
 * @LastEditors: zhangxiang
 * @LastEditTime: 2023-05-15 15:14:40
 * @Description:
 *
 */

module.exports = [
  // user login
  {
    url: '/login',
    type: 'post',
    response: (config) => {
      return {
        code: 200,
        message: 'success',
        data: {
          user: {
            id: 11,
            username: 'admin'
          },
          token: {
            expiration: 1655717237000,
            token: 'sgshajsaskahsasjkaashkajkashasaksassg'
          }
        }
      }
    }
  },

  // get user info
  {
    url: '/user/auth',
    type: 'get',
    response: (config) => {
      return {
        code: 200,
        message: 'success',
        data: {
          user: {
            id: 11,
            username: 'admin'
          },
          pagePermissions: {
            CNList: ['create', 'delete', 'browse', 'use'],
            CNToken: ['create', 'delete', 'browse', 'use'],
            NetMgmt: ['create', 'delete', 'browse', 'use'],
            SubNetMgmt: ['create', 'delete', 'browse', 'use'],
            SecurityGroupMgmt: ['create', 'delete', 'browse', 'use'],
            VMMgmt: ['create', 'delete', 'browse', 'use'],
            CloudStorageMgmt: ['create', 'delete', 'browse', 'use'],
            ElasticIP: ['create', 'delete', 'browse', 'use'],
            FloatIP: ['create', 'delete', 'browse', 'use'],
            RouteMgmt: ['create', 'delete', 'browse', 'use'],
            NetTopo: ['create', 'delete', 'browse', 'use'],
            FlowControl: ['create', 'delete', 'browse', 'use'],
            RegionMgmt: ['create', 'delete', 'browse', 'use'],
            ResourceMgmt: ['create', 'delete', 'browse', 'use'],
            ImageMgmt: ['create', 'delete', 'browse', 'use'],
            HostBackup: ['create', 'delete', 'browse', 'use'],
            HostMigration: ['create', 'delete', 'browse', 'use'],
            SystemMgmtMenu: ['create', 'delete', 'browse', 'use'],
            SystemMgmtQuota: ['create', 'delete', 'browse', 'use'],
            SystemMgmtVerify: ['create', 'delete', 'browse', 'use'],
            SystemMgmtRoles: ['create', 'delete', 'browse', 'use'],
            SystemMgmtAuthority: ['create', 'delete', 'browse', 'use'],
            SystemMgmtUsers: ['create', 'delete', 'browse', 'use'],
            SystemMonitorCNRes: ['create', 'delete', 'browse', 'use'],
            SystemMonitorCluster: ['create', 'delete', 'browse', 'use'],
            OrchestrateTraditional: ['create', 'delete', 'browse', 'use'],
            OrchestrateVisualized: ['create', 'delete', 'browse', 'use'],
            ClusterMgmtIndex: ['create', 'delete', 'browse', 'use'],
            ClusterMgmtDetail: ['create', 'delete', 'browse', 'use'],
            AppService: ['create', 'delete', 'browse', 'use'],
            DistributedDeployment: ['create', 'delete', 'browse', 'use'],
            PolicyDeployment: ['create', 'delete', 'browse', 'use'],
            K8SEventOverview: ['create', 'delete', 'browse', 'use'],
            AlarmOverview: ['create', 'delete', 'browse', 'use'],
            AuditLogs: ['create', 'delete', 'browse', 'use']
          }
        }
      }
    }
  }
]
